package com.otitan.la.forest.system.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.otitan.la.forest.system.dto.AreaHistoryDTO;
import com.otitan.la.forest.system.service.AreaHistoryService;
import com.otitan.la.forest.system.vo.AreaHistoryVO;
import com.otitan.webapp.framework.basepro.model.DataResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 行政区划表
 *
 * @author jiacs
 * @email xxx
 * @date 2020-10-13 14:46:25
 */
@Slf4j
@Api(tags = "行政区划历史表API")
@RestController
@RequestMapping("/area/history")
public class AreaHistoryController {

    @Autowired
    private AreaHistoryService areaHistoryService;

    @ApiOperation(value = "列表查询（分页）")
    @PostMapping("/findPage/{page}/{size}")
    public DataResult<Page<AreaHistoryVO>> findPageData(@PathVariable("page") long page,
                                                        @PathVariable("size") long size,
                                                        @RequestBody AreaHistoryDTO areaHistory) {
        return areaHistoryService.findPageData(page, size, areaHistory);
    }
}
